package lab02.test03;
import java.util.Scanner;
public class Test03 {
    public static void main(String[] args) {
        Student student = new Student();
        student.setComGradle(92);
        student.setMathGradle(98.5f);//float型值在后面加f
        student.setEnglGradle(89);
        Scanner sc = new Scanner(System.in);
        while (true){
            System.out.println("请输入你想实现的功能：");
            System.out.println("1" + "\t" + "求学生的总分。");
            System.out.println("2" + "\t" + "求学生的平均分。");
            System.out.println("3" + "\t" + "求学生的最高分。");
            System.out.println("4" + "\t" + "求学生的最低分。");
            System.out.println("5" + "\t" + "输出学生的信息。");
            System.out.println("6" + "\t" + "退出。");
            int i = sc.nextInt();
        switch (i) {
            case 1:
                student.sum();
                break;
            case 2:
                student.average();
                break;
            case 3:
                student.max();
                break;
            case 4:
                student.min();
                break;
            case 5:
                System.out.println(student.toString());
                break;
            case 6:
                return;
        }
        }
    }
}
